import { reqFindUser, reqTradeInfo } from '@/api'
const state = {
    address: [],
    orderInfo: {}
}
const mutations = {
    ADDRESSLIST(state, address) {
        state.address = address
    },
    TRADEINFO(state, data) {
        state.orderInfo = data
    }
}
const actions = {
    async UserAddressList({ commit }) {
        let result = await reqFindUser()
        if (result.code == 200) {
            commit('ADDRESSLIST', result.data)
        }
    },
    async TradeInfo({ commit }) {
        let result = await reqTradeInfo()
        if (result.code == 200) {
            commit('TRADEINFO', result.data)
        }
    }
}
const getters = {}
export default {
    state,
    mutations,
    actions,
    getters
}